package com.pine.common.beans.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * Data 请求体
 * </p>
 *
 * @author pine manage
 * @since 2024-10-09
 */
@Schema(title = "DataRequest", description = "Data请求体")
@Data
public class DataRequest<T> implements Serializable {

    @Serial
    private static final long serialVersionUID = 7827228383406455532L;

    @JsonProperty("data")
    @NotNull(message = "数据不能为空")
    @Schema(title = "data", description = "数据", requiredMode = Schema.RequiredMode.REQUIRED)
    private T data;
}
